package com.woniuxy.ticketsearch.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

/**
 * @ClassName Movie
 * @Description TODO
 * @Author zx
 * @Date 2021-03-16 10:28:25
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "movie_index")
public class Movie {
    @Id
    private int id;
    // 使用分词器
    /*
     *@author zx
     *@Description analyzer:使用ik_max_word分词器
     *@Date  2021-03-16 10:34:22
     *@Param 
     *@Return 
     */
    @Field(name = "name",analyzer = "ik_max_word",store = true)
    private String name;
    @Field(name = "actor",analyzer = "ik_max_word",store = true)
    private String actor;
    @Field(name = "description",analyzer = "ik_max_word",store = false)
    private String description;
}
